package com.codefish;

/**
 * 减去固定价格策略
 *
 * @author codefish
 * @version 1.0
 * @date 2022/05/07 下午 03:22
 */
public class ReduceDiscount implements IDiscount {
    /**
     * 折扣价格
     */
    private final double reduceValue;

    public ReduceDiscount(double reduceValue) {
        this.reduceValue = reduceValue;
    }

    @Override
    public double countDiscount(double price) {
        return reduceValue;
    }
}
